{template "header.html"}

{if $admin.adminid==1 && !IS_OEM_CMS}
{if is_file(CMSPATH.'Config/vip.lock') && !is_file(WRITEPATH.'config/safe.php')}
<div class="note note-danger">
    {if !dr_is_app('safe')}
    <p><a style="color: red" href="{dr_url('cloud/local')}">当前环境未能通过安全验证，请安装【系统安全加固】插件</a></p>
    {else}
    <p><a style="color: red" href="{dr_url('safe/home/index')}">当前环境未能通过安全验证，请按要求设置参数</a></p>
    {/if}
</div>
{elseif IS_DEV}
<div class="note note-danger">
    <p><a style="color: red" href="javascript:dr_help(204);">当前环境参数已经开启开发者模式，项目上线后建议关闭开发者模式</a></p>
</div>
{/if}
{/if}

<div class="row">

    <div class="col-md-6 col-sm-6">

        {if $ci->_is_admin_auth('')}
        <div class="portlet light bordered myportlet ">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-cog"></i>
                    <span class="caption-subject"> <a href="{dr_url('cloud/index')}">{dr_lang('程序信息')}</a> </span>
                </div>
            </div>
            <div class="portlet-body">

                <ul class="use-info">
                    {if IS_OEM_CMS}
                    <li>
                        <span>系统版本</span>
                        <a target="_blank" href="{$license.url}">{$cmf_version}</a>
                        <a id="dr_cmf_update" href="{dr_url('cloud/update')}" style="margin-left: 10px;display: none" class="badge badge-danger badge-roundless">  </a>
                    </li>

                    <li>
                        <span>官方网站</span>
                        <a target="_blank" href="{$license.url}" style="margin-right: 10px;">{$license.name}</a>
                    </li>
                    {else}
                    <li>
                        <span>系统版本</span>
                        <a target="_blank" href="https://www.xunruicms.com/version/">{$cmf_version}</a>
                        <a id="dr_cmf_update" href="{dr_url('cloud/update')}" style="margin-left: 10px;display: none" class="badge badge-danger badge-roundless">  </a>
                    </li>
                    <li style="overflow: initial;">
                        <span>系统内核</span>
                        <a href="https://www.xunruicms.com/frame/" target="_blank">{FRAME_NAME}（{FRAME_VERSION}）</a>
                        {if $frame}
                        <div class="btn-group">
                            <a class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" href="javascript:;"> 切换内核
                                <i class="fa fa-angle-down"></i>
                            </a>
                            <ul class="dropdown-menu">
                                {loop $frame $t}
                                <li><a href="javascript:dr_sys_edit('{$t}');"> {$t} </a></li>
                                {/loop}
                            </ul>
                        </div>
                        <script>
                            function dr_sys_edit(name) {
                                $.ajax({type: "GET",dataType:"json", url: "{dr_url('api/sys_edit')}&name="+name,
                                    success: function(json) {
                                        if (json.code == 1) {
                                            setTimeout("window.location.reload(true)", 2000);
                                        }
                                        dr_tips(json.code, json.msg);
                                    }
                                });
                            }
                        </script>
                        {/if}
                    </li>

                    <li>
                        <span>官方网站</span>
                        <a target="_blank" href="https://www.xunruicms.com/" style="margin-right: 10px;">www.xunruicms.com</a>
                    </li>
                    {/if}
                    <script>
                        $(function () {
                            {if !defined('SYS_NOT_UPDATE') || !SYS_NOT_UPDATE}
                            dr_check_version();
                            {else}
                            $('#dr_cmf_update').removeClass('badge-danger');
                            $('#dr_cmf_update').show();
                            $('#dr_cmf_update').attr('href', 'javascript:dr_check_version();');
                            $('#dr_cmf_update').html('{dr_lang('检测版本')}');
                            {/if}
                        });
                        function dr_check_version(){
                            $('#dr_cmf_update').html('{dr_lang('检测版本进行中...')}');
                            $.ajax({type: "GET",dataType:"json", url: "{dr_url('cloud/check_version')}&id=cms-1&isindex=1&version={CMF_VERSION}",
                                success: function(json) {
                                    if (json.code) {
                                        $('#dr_cmf_update').addClass('badge-danger');
                                        $('#dr_cmf_update').show();
                                        $('#dr_cmf_update').html(json.msg);
                                    } else {
                                        $('#dr_cmf_update').html("");
                                    }
                                }
                            });
                        }
                    </script>
                </ul>
            </div>
        </div>
        {/if}
        {template "main/couts.html"}
    </div>

    <div class="col-md-6 col-sm-6">
        {template "main/notice.html"}
    </div>
</div>
{template "footer.html"}